<?php
declare (strict_types = 1);

namespace app\command;

use app\command\services\HxService;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
use think\facade\Log;

class hello extends Command
{

    protected function configure()
    {
        // 指令配置
        $this->setName('app\command\hello')
            ->setDescription('the app\command\hello command');
    }

    protected function execute(Input $input, Output $output)
    {
        $hxApi = $this->app->make(HxService::class);
        $hxApi = new HxService();

        /*获取类目*/
//         ($hxApi->getCategory( [
//             'parent_id'=>'0',
//             'class_id'=>'1343',
//             'level'=>'1',
//         ]));

//        $hxApi->handleMessage();

        /*获取当前选品库商品，并铺货*/
        /*1、获取选品库的ids
            2、获取选品库商品详情铺到本地。
            3、获取消息更新维护本地库。
        */
//        $list = $hxApi->getProducts();
//
//
//
//
//        dump($list);
       log_write('获取商品列表成功');
        // 指令输出
        $output->writeln('app\command\hello');
    }
}
